package edu.gatech.spacetraderteam3.model;

/**
 * Turns boring Plane + State info into pretty sentences!
 * @author Aaron
 * @version 200
 */
public class NewsTranslator {

    /**
     * Translates the Solar System's state into a cool string for the View to later use.
     * @param system	System in question
     * @return	Awesomely written verboseness.
     */
    public static String translateState(SpaceSolarSystem system) {
        final String name = system.getName();
        switch (system.getState()) {
            case WAR:
                return "Tensions in "
                        + name
                        + " have been steadily increasing recently, resulting in widespread strife across the system! Unarmed traders are encouraged to avoid the dangerous area.";
            case PEACE:
                return "The leaders in "
                        + name
                        + " have come to an agreement! The fighting there has ceased, and the inhabitants are returning to their homes again.";
            case FAMINE:
                return "Due to errors in reported estimates, "
                        + name
                        + " has mistakenly shipped a large portion of its foodstuffs offsystem! The government is requesting those with food to consider donating.";
            case DROUGHT:
                return "Solar flares near "
                        + name
                        + " have caused an abnormal amount of hyperevaporation! Citizens are searching for every drop of water they can get their hands on.";
            case SURPLUS:
                return name
                        + " has become a booming center for trade. Traders and their goods are swarming the planet looking for sellers of their excess goods.";
            case RECESSION:
                return name
                        + " has fallen on rough times. Lowering interest rates and wages have left it barren and desolate, with many workers leaving for more profitable systems.";
            case BORED:
                return "A recent outbreak of HyperLethargy is plagueing "
                        + name
                        + ". Medical proffesionals have determined the cause to be of intense, unavoidable boredom - but how will they fix it?";
            case BUSY:
                return "Citizens in "
                        + name
                        + " are experiencing a period of mass productivity! Due to lack of spare time, many workers are suffering from stress and increased health risks.";
            case COLDSPELL:
                return "A particularly prolonged eclipse in the "
                        + name
                        + " system has caused an unusual climate change on the effected planets. This \"Global Cooling\" effect has caused problems for tourism.";
            case PLAGUE:
                return "An advanced space bacteria has found its way to "
                        + name
                        + "! Medical testing has shown it to be curable, but supplies are running low. Will the outbreak spread?";
            case NOWORKERS:
                return "Workers have been leaving "
                        + name
                        + " at an alarming rate in the past few sweeps! Employers are looking for automated alternatives due to the low population they have to work with.";
            default:
                return "Nothing interesting seems to be happening in " + name + ".";
        }
    }

    /**
     * The NewsTranslator class's string representation. You should never see this.
     * @return A brief warning.
     */
    public String toString() {
        return "News Translator! You shouldn't be seeing this...";
    }
}
